package com.mingyuan.library.domain.lending.book.exception;

import com.mingyuan.library.domain.common.exception.BusinessException;
import com.mingyuan.library.domain.lending.patron.enums.ErrorCodeEnum;

/**
 *
 * 图书借阅错误异常
 * @author yangzk
 * @version 1.0.0
 * @date 2022.11.29 09:23
 */
public class BookException extends BusinessException {

    private static final long serialVersionUID = -7292321652690465884L;

    public BookException() {
        super(ErrorCodeEnum.BIZ_ERROR);
    }
    public BookException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getErrCode(), errorCodeEnum.getErrMessage());
    }
    public BookException(String errCode, String message) {
        super(errCode, message);
    }
    public BookException(String message) {
        super(ErrorCodeEnum.BIZ_ERROR.getErrCode(), message);
    }

    public BookException(Throwable cause) {
        super(ErrorCodeEnum.BIZ_ERROR, cause);
    }

    public BookException(String message, Throwable cause) {
        super(ErrorCodeEnum.BIZ_ERROR.getErrCode(), message, cause);
    }

}
